Ext.define("byb.view.system.AdmUser",{
    extend:"byb.view.BaseManager",
    alias:"widget.sysmgr_userManager",
    requires:["byb.view.grid.system.AdmUser"],
    buildQueryView:function(){
        var me=this;
        return {
            xtype:"form",
            border:false,
            layout:"hbox",
            defaultType:"textfield",
            height:40,
            labelWidth:90,
            items:[{
                fieldLabel:"用户名",
	            labelStyle: "text-align:right;",
                style:"margin:10px 10px ",
                name:"username",
                allowBlank:true
            }
//            ,{
//                fieldLabel:"姓名",
//	            labelStyle: "text-align:right;",
//                style:"margin:10px 10px ",
//                name:"fullname",
//                allowBlank:true
//            }
            ,{
            	xtype:"combo",
	            labelStyle: "text-align:right;",
	            fieldLabel:"角色",
	            displayField:"roleName",
	            valueField:"id",
	            store:Ext.create("byb.store.system.AdmRole"),
	            name:"roleId",
                emptyText:"--请选择--",
                editable:false,
                forceSelection: true,
                style:"margin:10px 10px",
	            allowBlank:true
            },{
            	xtype:'button',
                style:"margin:10px 10px ",
            	text:'查询'
            },{
                xtype:"button",
                style:"margin:10px 10px",
                text:"清除",
                action:"clear",
                handler:function(button){
                    var formPanel= button.up("form");
                    formPanel.getForm().reset();
                }
            }]
        }
    },
    buildGridView:function(){
        return {
        	  xtype:"sysmgr_userManagerGrid",
              region:"center",
              frame:false,
              border:false
        }
    },
    doDataLoad: function() {
        var store =  Ext.ComponentQuery.query('sysmgr_userManagerGrid')[0].getStore();
        store.getProxy().setExtraParam("condition", '{}');
        Ext.ComponentQuery.query('sysmgr_userManagerGrid pagingtoolbar')[0].moveFirst();
    }
});
